home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / git-4.3 / git-4 / git-4.3.11 / src / misc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-04-22  |  3.0 KB  |  114 lines

  1. /* misc.h -- Prototypes for the functions in misc.c.  */
  2.  
  3. /* Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
  4.  
  5.    This program is free software; you can redistribute it and/or modify
  6.    it under the terms of the GNU General Public License as published by
  7.    the Free Software Foundation; either version 2, or (at your option)
  8.    any later version.
  9.  
  10.    This program is distributed in the hope that it will be useful,
  11.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.    GNU General Public License for more details.
  14.  
  15.    You should have received a copy of the GNU General Public License
  16.    along with this program; if not, write to the Free Software
  17.    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  18.  
  19. /* Written by Tudor Hulubei and Andrei Pitis.  */
  20.  
  21.  
  22. #ifndef _GIT_MISC_H
  23. #define _GIT_MISC_H
  24.  
  25.  
  26. #include <sys/types.h>
  27.  
  28. #ifdef HAVE_UNISTD_H
  29. #include <unistd.h>
  30. #endif /* HAVE_UNISTD_H */
  31.  
  32. #include "xtime.h"
  33.  
  34. #include "stdc.h"
  35.  
  36.  
  37. extern pid_t pid;
  38. extern char *home;
  39. extern char *program;
  40. extern char *tty_type;
  41.  
  42. extern char  *tty_name;
  43. extern size_t tty_name_len;
  44. extern char  *login_name;
  45. extern size_t login_name_len;
  46.  
  47. extern char *day_name[];
  48. extern char *month_name[];
  49.  
  50. extern int SCREEN_X;
  51. extern int SCREEN_Y;
  52.  
  53. extern char cSection[];
  54. extern char bwSection[];
  55.  
  56.  
  57. #undef max
  58. #undef min
  59. #define max(a, b) (((a) >= (b)) ? (a) : (b))
  60. #define min(a, b) (((a) <= (b)) ? (a) : (b))
  61.  
  62.  
  63. #define close2(fd1, fd2)        \
  64. {                               \
  65.      close(fd1);                \
  66.      close(fd2);                \
  67. }
  68.  
  69.  
  70. #define xfree2(ptr1, ptr2)      \
  71. {                               \
  72.      xfree(ptr1);               \
  73.      xfree(ptr2);               \
  74. }
  75.  
  76.  
  77. typedef struct file_type_info_tag
  78. {
  79.     char *regexp;
  80.     int foreground;
  81.     int background;
  82.     int brightness;
  83.     struct file_type_info_tag *next;
  84. } file_type_info_t;
  85.  
  86.  
  87. extern file_type_info_t * fti_head;
  88.  
  89.  
  90. extern RETSIGTYPE fatal_signal        PROTO ((int));
  91. extern void display_exit_message    PROTO ((char *));
  92. extern void configuration_help        PROTO ((char *));
  93. extern void common_configuration_init    PROTO (());
  94. extern int specific_configuration_init    PROTO (());
  95. extern void use_section            PROTO ((char *));
  96. extern int get_int_var            PROTO ((char *, int));
  97. extern int get_const_var        PROTO ((char *, char *[], int, int));
  98. extern int get_flag_var            PROTO ((char *, int));
  99. extern char *get_string_var        PROTO ((char *, char *));
  100. extern void get_colorset_var        PROTO ((int *, char *[], int));
  101. extern char *clear_path            PROTO ((char *));
  102. extern void get_tty_name        PROTO (());
  103. extern void get_login_name        PROTO (());
  104. extern void truncate_long_name        PROTO ((char *, char *, size_t));
  105. extern char *truncate_string        PROTO ((char *, char *, size_t));
  106. extern int get_file_length        PROTO ((int));
  107. extern struct tm *get_local_time    PROTO (());
  108. extern int is_a_bg_command        PROTO ((char *));
  109. extern int is_an_empty_command        PROTO ((char *));
  110. extern void get_file_type_info        PROTO (());
  111.  
  112.  
  113. #endif  /* _GIT_MISC_H */
  114.